<?php
class Lib_Application_Resource_Auth extends Zend_Application_Resource_ResourceAbstract {

    /**
     * @var Zend_Auth
     */
    private $_auth;
    /**
     * Strategy pattern: initialize resource
     *
     * @return mixed
     */
    public function init()
    {
        $auth = Zend_Auth::getInstance();
        $authStorage = new Zend_Auth_Storage_Session('SESSIONS_Automoto');
        $auth->setStorage($authStorage);
        $this->setAuth($auth);

        return $this->_auth;
    }

    /**
     * @param \Zend_Auth $auth
     * @return void
     */
    public function setAuth($auth)
    {
        $this->_auth = $auth;
    }

    /**
     * @return \Zend_Auth
     */
    public function getAuth()
    {
        return $this->_auth;
    }


}